{/* LAYOUT模板 */}
<layout name="layout"/>
{/* LAYOUT模板 */}
{/* import Js,Css */}
<js href="__PUBLIC__/js/admin/listTable.js"/>
<js href="__PUBLIC__/js/admin/js.util.js"/>
<css href="__PUBLIC__/css/admin/admin.css" />
<css href="__PUBLIC__/css/jquery-ui.css" />
<js href="__PUBLIC__/js/core/jquery-ui.1.10.4.js" />
<js href="__PUBLIC__/js/core/plugins.js"/>
{/* import js,css */}
<!-- [position] -->
	<include file="Template:position"/>
<!-- [position] -->
<div id="loading"><!--#loading#--></div>


<div class="list-div" id="listDiv">
	<table class="cat-list-table" width="100%" cellspacing="1" cellpadding="2" id="list-table">
		<tbody>
			<tr>
				<th>文章分类名称</th>
				<th>分类类型</th>
				<th>描述</th>
				<th>排序</th>
				<th>是否显示在导航栏</th>
				<th>操作</th>
			</tr>
			<volist name="articleCatList" id="articleCat">
			<tr id="tr_{$articleCat.cat_id}" data="{$articleCat.parent_id}-{$articleCat.cat_id}">
				<td width="120px" align="left" class="first-cell nowrap" valign="top" style="background-color: rgb(255, 255, 255);">
					<img src="__PUBLIC__/image/admin/menu_minus.gif" id="icon_0_4" width="9" height="9" border="0" style="margin-left:0em" onclick="rowClicked(this)">
					<span>
						<a href="__APP__/article/article_list?cat_id=4">{$articleCat.cat_name}</a>
					</span>
				</td>
				<td width="200px" class="nowrap" valign="top" align="center" style="background-color: rgb(255, 255, 255);">
					<switch name="articleCat.cat_type" >
						<case value="1">站内快讯</case>
						<case value="2">系统分类</case>
						<case value="3">网店信息</case>
						<case value="4">帮助分类</case>
						<case value="5">网店帮助</case>
						<default />
					</switch>
				</td>
				<td align="left" valign="top" style="background-color: rgb(255, 255, 255);">
					{$articleCat.cat_desc}
				</td>
				<td width="10%" align="center" class="nowrap" valign="top" style="background-color: rgb(255, 255, 255);">
					<span onclick="listTable.edit(this, 'edit_sort_order', 4)">{$articleCat.sort_order}</span>
				</td>
				<td width="10%" class="nowrap" align="center" valign="top" style="background-color: rgb(255, 255, 255);">
					<img src="__PUBLIC__/image/admin/no.gif" onclick="listTable.toggle(this, 'toggle_show_in_nav', 4)">
				</td>
				<td width="24%" align="left" class="nowrap" valign="top" style="background-color: rgb(255, 255, 255);">
					<a href="__APP__/articlecat/mod_articlecat?cat_id={$articleCat.cat_id}">编辑</a>
					|
					<a href="javascript:delete_articlecat('__APP__/articlecat/articleCatAjaxTable','{$articleCat.parent_id}','{$articleCat.cat_id}');" title="移除">移除</a>
				</td>
			</tr>
			</volist>
		</tbody>
	</table>
</div>



<script>
/*删除分类*/
function delete_articlecat(url,parent_id,id){
	$.ajax({
		url:url,
		type:'post',
		dataType:'json',
		data:{id:id,action:'del'},
		beforeSend:function(){		
			$('#loading').QLoading({text:'删除中...',status:'open',modal:false});
		},
		success:function(msg){
			if(msg.data == '1'){
				$('#tr_' + id).remove();
				$('#loading').QLoading({img:'happy',text:msg.info,status:'close',modal:false,time:1.5});			
			}
			else{
				$('#loading').QLoading({img:'sad',text:msg.info,status:'close',modal:false,time:1.5});			
			}
		}
	});
}
</script>




